﻿using System.Web.Mvc;

namespace Controllers.Controllers
{
    /// <summary>
    /// 错误控制器
    /// </summary>
    public class ErrorController : Controller
    {
        public ActionResult Page404()
        {
            if (HttpContext.Request.IsAjaxRequest())
            {
                return Content("404");
            }
            return View("Page404");
        }

        public ActionResult Page403()
        {
            if (HttpContext.Request.IsAjaxRequest())
            {
                return Content("403");
            }
            return View("Page403");
        }

        public ActionResult Page500()
        {
            if (HttpContext.Request.IsAjaxRequest())
            {
                return Content("500");
            }
            return View("Page500");
        }

        public ActionResult Error()
        {
            if (HttpContext.Request.IsAjaxRequest())
            {
                return Content("Error");
            }
            return View("Error");
        }

        public ActionResult SiteClose()
        {
            if (HttpContext.Request.IsAjaxRequest())
            {
                return Content("SiteClose");
            }
            return View("SiteClose");
        }

    }
}
